package cn.ming.springbootdynamicdatasourcedemo.entiy;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;

import java.io.Serializable;

/**
 * <p>
 * 用户地址表 
 * </p>
 *
 * @author kingbird
 * @since 2021-09-13
 */
@TableName("user_address")
public class Address extends Model<Address> {

    private static final long serialVersionUID = 1L;

    /**
     * 地址主键id
     */
    private String id;
    /**
     * 关联用户id
     */
    @TableField("user_id")
    private String userId;
    /**
     * 收件人姓名
     */
    private String receiver;
    /**
     * 收件人手机号
     */
    private String mobile;
    /**
     * 省份
     */
    private String province;
    /**
     * 城市
     */
    private String city;
    /**
     * 区县
     */
    private String district;
    /**
     * 详细地址
     */
    private String detail;
    /**
     * 扩展字段
     */
    private String extand;
    /**
     * 是否默认地址
     */
    @TableField("is_default")
    private Integer isDefault;
    /**
     * 创建时间
     */
    @TableField("created_time")
    private Date createdTime;
    /**
     * 更新时间
     */
    @TableField("updated_time")
    private Date updatedTime;


    public String getId() {
        return id;
    }

    public Address setId(String id) {
        this.id = id;
        return this;
    }

    public String getUserId() {
        return userId;
    }

    public Address setUserId(String userId) {
        this.userId = userId;
        return this;
    }

    public String getReceiver() {
        return receiver;
    }

    public Address setReceiver(String receiver) {
        this.receiver = receiver;
        return this;
    }

    public String getMobile() {
        return mobile;
    }

    public Address setMobile(String mobile) {
        this.mobile = mobile;
        return this;
    }

    public String getProvince() {
        return province;
    }

    public Address setProvince(String province) {
        this.province = province;
        return this;
    }

    public String getCity() {
        return city;
    }

    public Address setCity(String city) {
        this.city = city;
        return this;
    }

    public String getDistrict() {
        return district;
    }

    public Address setDistrict(String district) {
        this.district = district;
        return this;
    }

    public String getDetail() {
        return detail;
    }

    public Address setDetail(String detail) {
        this.detail = detail;
        return this;
    }

    public String getExtand() {
        return extand;
    }

    public Address setExtand(String extand) {
        this.extand = extand;
        return this;
    }

    public Integer getIsDefault() {
        return isDefault;
    }

    public Address setIsDefault(Integer isDefault) {
        this.isDefault = isDefault;
        return this;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public Address setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
        return this;
    }

    public Date getUpdatedTime() {
        return updatedTime;
    }

    public Address setUpdatedTime(Date updatedTime) {
        this.updatedTime = updatedTime;
        return this;
    }

    @Override
    public Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Address{" +
        ", id=" + id +
        ", userId=" + userId +
        ", receiver=" + receiver +
        ", mobile=" + mobile +
        ", province=" + province +
        ", city=" + city +
        ", district=" + district +
        ", detail=" + detail +
        ", extand=" + extand +
        ", isDefault=" + isDefault +
        ", createdTime=" + createdTime +
        ", updatedTime=" + updatedTime +
        "}";
    }
}
